package com.chinasofti.bufferedio;

import java.util.Arrays;

public class Demo07 {
    public static void main(String[] args) {
//        int [] arr = {3,2,7,4,6};
//        //返回字符串内容的字符串表现形式
//        System.out.println(Arrays.toString(arr));

//        int [] arr = {3,2,7,4,6};
//        Arrays.sort(arr);
//        System.out.println(Arrays.toString(arr));

        int [] arr = {3,2,7,4,6};
        //二分法查找指定元素索引
       int index =  Arrays.binarySearch(arr, 7);
        System.out.println("index="+index);



    }
}
